statefiles: simplify dhcpv6_ia_write_hostsfile()
authorDavid Härdeman <[email protected]>
Fri, 7 Nov 2025 16:25:40 +0000 (17:25 +0100)
committerÁlvaro Fernández Rojas <[email protected]>
Tue, 11 Nov 2025 07:29:38 +0000 (08:29 +0100)
commit134ec453dd586a275039a5f164cbf9597a3c931c
tree36ac145d358828defe3381a91851bf3bf8213fd3
parent7136fbe390a567b08324c9d9978d32ad1ea596a7
statefiles: simplify dhcpv6_ia_write_hostsfile()

Use a dirfd to keep track of the hostsfile directory, also make sure
that the directory is created if necessary (this is in preparation for
writing per-interface hostsfiles).

Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/302
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
src/config.c
src/odhcpd.h
src/statefiles.c